/*
 * monster.h
 *
 *  Created on: 10 mai 2013
 *      Author: User One
 */

#ifndef MONSTER_H_
#define MONSTER_H_



typedef struct s_monster * t_monster;


// Creates a new monster with a given number of available bombs
t_monster monster_init(int life_number);
extern void monster_free(t_monster monster);


// Returns the current position of the monster
extern int monster_get_x(t_monster monster);
extern int monster_get_y(t_monster monster);

void monster_set_xy(t_monster monster, int x, int y);

Uint32 monster_get_time(t_monster monster);

int monster_get_stat(t_monster monster);

void monster_reset_time(t_monster monster);

// Set the direction of the next move of the monster
extern void monster_set_current_way(t_monster monster, enum e_way way);

// Load the monsters positions from the map
void monster_from_map(t_monster* monster, t_map map);

void select_random_direction(t_monster monster, int j);




int bomb_explods_monster(t_monster monster, t_map map, t_player player);

void monster_die (t_monster monster, t_map map);

// Move the monster according to the current direction
extern int monster_move(t_monster monster, t_map map, t_player player);

void monster_restart (t_monster monster, t_map map);

void monster_disppear(t_monster monster);

// Display the monster on the screen
extern void monster_display(t_monster monster, SDL_Surface *screen);

#endif /* MONSTER_H_ */
